import 'package:flutter/material.dart';

class CommFloatingActionButton extends StatelessWidget {
  final String title;
  final Function onTap;

  const CommFloatingActionButton(this.title, this.onTap, {Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: () => onTap(),
      child: Container(
        height: 40.0,
        margin: const EdgeInsets.all(20.0),
        decoration: BoxDecoration(color: Colors.green, borderRadius: BorderRadius.circular(10.0)),
        child: Center(
          child: Text(
            title,
            style: const TextStyle(color: Colors.white, fontSize: 16.0, fontWeight: FontWeight.w600),
          ),
        ),
      ),
    );
  }
}
